import AnchorScrollView from "./anchorScroll.view.mjs";
import ClassRerunView from "./class-rerun.mjs";
import CompileLinkView from "./compile-link.view.mjs";
import DCompilerView from "./d-compiler.view.mjs";
import DtView from "./d-templateCache.mjs";
import FilterFriendsView from "./filter-friends.mjs";
import FilterModuleView from "./filter-module.mjs";
import HeroAppView from "./hero-app.view.mjs";
import HttpExampleView from "./http-example.mjs";
import IntercomponentCommunicationView from "./intercomponent-communication.view.mjs";
import NgHrefView from "./ng-href.mjs";
import NgIncludeView from "./ng-include.view.mjs";
import NgInitBetterPracticeView from "./ng-init-better-practice.view.mjs";
import NgModelView from "./ng-model.view.mjs";
import NgOnView from "./ng-on.mjs";
import NgPatternView from "./ng-pattern.mjs";
import NgPropView from "./ng-props.mjs";
import NgRefInsideView from "./ng-ref-inside.view.mjs";
import NgRefView from "./ng-ref.mjs";
import NgRepeatFilterView from "./ng-repeat-filter.view.mjs";
import NgSwitchView from "./ng-switch.view.mjs";
import NgTranscludeView from "./ng-transclude.mjs";
import ParentControllerView from "./parent-controller.mjs";
import PlayDecoratorView from "./play-decorator.mjs";
import PlayDragView from "./play-drag.mjs";
import PopoverView from "./popover.mjs";
import ProviderServiceView from "./provider-service.view.mjs";
import TriNavView from "./s-tri-nav.mjs";
import SeView from "./service-example.mjs";
import ToolTipView from "./tooltip.mjs";
import WhatIfView from "./what-if.mjs";
import { defineIndexRouteView } from "@/routers/common-index.mjs";
import { combRouter } from "@/routers/tools.mjs";

/**
 * @todo autoLoad, 套路: 去掉View后缀, 转为camelcase
 * @type {DefineRoute[]}
 */
export const subRoutingBB = [
  combRouter(FilterModuleView, {
    name: "dg.bb.filter-module",
    url: "/filter-module",
  }),
  combRouter(SeView, {
    name: "dg.bb.service-example",
    url: "/service-example",
  }),
  combRouter(DtView, {
    name: "dg.bb.d-templateCache",
    url: "/d-templateCache",
  }),
  combRouter(HttpExampleView, {
    name: "dg.bb.http-example",
    url: "/http-example",
  }),
  combRouter(ParentControllerView, {
    name: "dg.bb.parent-controller",
    url: "/parent-controller",
  }),
  combRouter(WhatIfView, {
    name: "dg.bb.what-if",
    url: "/what-if",
  }),
  combRouter(NgHrefView, {
    name: "dg.bb.ng-href",
    url: "/ng-href",
  }),
  combRouter(NgTranscludeView, {
    name: "dg.bb.ng-transclude",
    url: "/ng-transclude",
  }),
  combRouter(FilterFriendsView, {
    name: "dg.bb.filter-friends",
    url: "/filter-friends",
  }),
  combRouter(NgPropView, {
    name: "dg.bb.ng-props",
    url: "/ng-props",
  }),
  combRouter(PlayDecoratorView, {
    name: "dg.bb.play-decorator",
    url: "/play-decorator",
  }),
  combRouter(NgOnView, {
    name: "dg.bb.ng-on",
    url: "/ng-on",
  }),
  combRouter(TriNavView, {
    name: "dg.bb.tri-nav",
    url: "/tri-nav",
  }),
  combRouter(ToolTipView, {
    name: "dg.bb.tooltip",
    url: "/tooltip",
  }),
  combRouter(PopoverView, {
    name: "dg.bb.popover",
    url: "/popover",
  }),
  combRouter(NgRefView, {
    name: "dg.bb.ng-ref",
    url: "/ng-ref",
  }),
  combRouter(NgPatternView, {
    name: "dg.bb.ng-pattern",
    url: "/ng-pattern",
  }),
  combRouter(ClassRerunView, {
    name: "dg.bb.class-rerun",
    url: "/class-rerun",
  }),
  combRouter(PlayDragView, {
    name: "dg.bb.play-drag",
    url: "/play-drag",
  }),
  combRouter(DCompilerView, {
    name: "dg.bb.d-compiler",
    url: "/d-compiler",
  }),
  combRouter(CompileLinkView, {
    name: "dg.bb.compile-link",
    url: "/compile-link",
  }),
  combRouter(NgModelView, {
    name: "dg.bb.ng-model",
    url: "/ng-model",
  }),
  combRouter(ProviderServiceView, {
    name: "dg.bb.provider-service",
    url: "/provider-service",
  }),
  combRouter(NgIncludeView, {
    name: "dg.bb.ng-include",
    url: "/ng-include",
  }),
  combRouter(IntercomponentCommunicationView, {
    name: "dg.bb.intercomponent-communication",
    url: "/intercomponent-communication",
  }),
  combRouter(NgRepeatFilterView, {
    name: "dg.bb.ng-repeat-filter",
    url: "/ng-repeat-filter",
  }),
  combRouter(NgRefInsideView, {
    name: "dg.bb.ng-ref-inside",
    url: "/ng-ref-inside",
  }),
  combRouter(NgInitBetterPracticeView, {
    name: "dg.bb.ng-init-better-practice",
    url: "/ng-init-better-practice",
  }),
  combRouter(NgSwitchView, {
    name: "dg.bb.ng-switch",
    url: "/ng-switch",
  }),
  combRouter(HeroAppView, {
    name: "dg.bb.hero-app",
    url: "/hero-app",
  }),
  combRouter(AnchorScrollView, {
    name: "dg.bb.anchor-scroll",
    url: "/anchor-scroll",
  }),
];

const bbView = defineIndexRouteView(subRoutingBB);

export default bbView;

if (import.meta.webpackHot) {
  console.log("import.meta.webpackHot", import.meta.webpackHot);
  import.meta.webpackHot.accept("./ng-ref-inside.view.mjs", () => {
    console.log("Hot accept ./ng-ref-inside.view.mjs");
  });
}
